﻿// (c) Copyright Fernando Cerqueira.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.using System;

using System.ComponentModel;
using Microsoft.Windows.Design;
using Microsoft.Windows.Design.Features;
using Microsoft.Windows.Design.Metadata;

namespace DevPhone.Controls.Design
{
    class CheckPickerPageControlMetadata : AttributeTableBuilder
    {
        public CheckPickerPageControlMetadata()
        {
            // Type attributes
            AddCustomAttributes(typeof(CheckPickerPageControl), new DescriptionAttribute("Represents a container that can collapsed and expanded with selected item."));
            AddCustomAttributes(typeof(CheckPickerPageControl), new FeatureAttribute(typeof(DropDownControlInitializer)));
            AddCustomAttributes(typeof(CheckPickerPageControl), new ToolboxBrowsableAttribute(true));

            // Hide properties         
            AddCustomAttributes(typeof(CheckPickerPageControl), "Height", new BrowsableAttribute(false));
            AddCustomAttributes(typeof(CheckPickerPageControl), "Background", new BrowsableAttribute(false));
            AddCustomAttributes(typeof(CheckPickerPageControl), "Foreground", new BrowsableAttribute(false));

            // Property attributes     
            AddCustomAttributes(typeof(CheckPickerPageControl), "Header", new TypeConverterAttribute(typeof(StringConverter)));
            AddCustomAttributes(typeof(CheckPickerPageControl), "Header", new CategoryAttribute(MetadataStore.CheckPickerPageProperties));
            AddCustomAttributes(typeof(CheckPickerPageControl), "Header", new DescriptionAttribute("Gets or sets the header."));

            AddCustomAttributes(typeof(CheckPickerPageControl), "HeaderTemplate", new CategoryAttribute(MetadataStore.CheckPickerPageProperties));
            AddCustomAttributes(typeof(CheckPickerPageControl), "HeaderTemplate", new DescriptionAttribute("Gets or sets the template used to display the control's header."));

            AddCustomAttributes(typeof(CheckPickerPageControl), "PageHeader", new TypeConverterAttribute(typeof(StringConverter)));
            AddCustomAttributes(typeof(CheckPickerPageControl), "PageHeader", new CategoryAttribute(MetadataStore.CheckPickerPageProperties));
            AddCustomAttributes(typeof(CheckPickerPageControl), "PageHeader", new DescriptionAttribute("Gets or sets the page header."));

            AddCustomAttributes(typeof(CheckPickerPageControl), "PageHeaderTemplate", new CategoryAttribute(MetadataStore.CheckPickerPageProperties));
            AddCustomAttributes(typeof(CheckPickerPageControl), "PageHeaderTemplate", new DescriptionAttribute("Gets or sets the template used to display the page header."));

            AddCustomAttributes(typeof(CheckPickerPageControl), "PageHeaderDataContext", new CategoryAttribute(MetadataStore.CheckPickerPageProperties));
            AddCustomAttributes(typeof(CheckPickerPageControl), "PageHeaderDataContext", new DescriptionAttribute("Gets or sets the data context template used to display the page header."));

            AddCustomAttributes(typeof(CheckPickerPageControl), "PageImageBackground", new CategoryAttribute(MetadataStore.CheckPickerPageProperties));
            AddCustomAttributes(typeof(CheckPickerPageControl), "PageImageBackground", new DescriptionAttribute("Gets or sets the image background page."));

            AddCustomAttributes(typeof(CheckPickerPageControl), "PageBackground", new CategoryAttribute(MetadataStore.CheckPickerPageProperties));
            AddCustomAttributes(typeof(CheckPickerPageControl), "PageBackground", new DescriptionAttribute("Gets or sets the background page."));

            AddCustomAttributes(typeof(CheckPickerPageControl), "ItemTemplate", new CategoryAttribute(MetadataStore.CheckPickerPageProperties));
            AddCustomAttributes(typeof(CheckPickerPageControl), "ItemTemplate", new DescriptionAttribute("Gets or sets the page item template."));

            AddCustomAttributes(typeof(CheckPickerPageControl), "PickerPageUri", new CategoryAttribute(MetadataStore.CheckPickerPageProperties));
            AddCustomAttributes(typeof(CheckPickerPageControl), "PickerPageUri", new DescriptionAttribute("Gets or sets the Uri to use for loading teh page when the control is clicked."));

            AddCustomAttributes(typeof(CheckPickerPageControl), "SelectedTemplate", new CategoryAttribute(MetadataStore.CheckPickerPageProperties));
            AddCustomAttributes(typeof(CheckPickerPageControl), "SelectedTemplate", new DescriptionAttribute("Gets or sets the seleted item template."));

            AddCustomAttributes(typeof(CheckPickerPageControl), "SelectedItems", new CategoryAttribute(MetadataStore.CheckPickerPageProperties));
            AddCustomAttributes(typeof(CheckPickerPageControl), "SelectedItems", new DescriptionAttribute("Gets or sets the seleted item."));

            AddCustomAttributes(typeof(CheckPickerPageControl), "InheritOrientation", new CategoryAttribute(MetadataStore.CheckPickerPageProperties));
            AddCustomAttributes(typeof(CheckPickerPageControl), "InheritOrientation", new DescriptionAttribute("Gets or sets the Inherit Orientation on page."));

            AddCustomAttributes(typeof(CheckPickerPageControl), "DisabledBrush", new CategoryAttribute(MetadataStore.BrushesProperties));
            AddCustomAttributes(typeof(CheckPickerPageControl), "DisabledBrush", new DescriptionAttribute("Gets or sets the foreground brush from disabled state."));

            AddCustomAttributes(typeof(CheckPickerPageControl), "ControlBackground", new CategoryAttribute(MetadataStore.BrushesProperties));
            AddCustomAttributes(typeof(CheckPickerPageControl), "ControlBackground", new DescriptionAttribute("Gets or sets the control background color."));

            AddCustomAttributes(typeof(CheckPickerPageControl), "ControlForeground", new CategoryAttribute(MetadataStore.BrushesProperties));
            AddCustomAttributes(typeof(CheckPickerPageControl), "ControlForeground", new DescriptionAttribute("Gets or sets the control foreground color."));

        }
    }
}
